//
//  FeedBackApi.m
//  DTSTON
//
//  Created by 喻贵华 on 15/12/15.
//  Copyright © 2015年 Demo. All rights reserved.
//

#import "FeedBackApi.h"

@implementation FeedBackApi
{
    NSDictionary *_feedback;
}
-(id)initWith:(NSDictionary *)feedback
{
    self=[super init];
    if(self)
    {
        _feedback=feedback;
        
    }
    return self;

}
-(YTKRequestMethod)requestMethod
{
    return YTKRequestMethodPOST;
}

-(NSString *)requestUrl
{
    return @"/feedback/user_feedback";
}
-(id)requestArgument
{
    
    NSMutableDictionary *mdic=[NSMutableDictionary getPubdic];
    if (_feedback[@"content"]) {
        [mdic setObject:_feedback[@"content"] forKey:@"content"];
    }
    if (_feedback[@"contact_way"]) {
        [mdic setObject:_feedback[@"contact_way"] forKey:@"contact_way"];
    }
//    if (_feedback[@"type_id"]) {
//        [mdic setObject:_feedback[@"type_id"] forKey:@"type_id"];
//    }
    NSString *sign= [NSString getSign:mdic];
    [mdic setObject:sign forKey:@"sign"];
    return mdic;

}
-(void)dealloc
{
   NSLog(@"%@ dealloc",NSStringFromClass([self class]));
}
@end
